#region Using Directives

using System;
using System.Web.UI;
using System.ComponentModel;
using System.Drawing;
using System.Web.UI.WebControls;

#endregion

namespace Web.Google
{
    [ParseChildren(true, "DataPoints"), PersistChildren(false)]
    public class DataSet : StateManagedItem
    {
        #region Fields

        private DataPointCollection dataPoints;

        #endregion

        #region Properties

        [
            MergableProperty(false),
            PersistenceMode(PersistenceMode.InnerDefaultProperty),
        ]
        public DataPointCollection DataPoints
        {
            get
            {
                if (dataPoints == null)
                {
                    dataPoints = new DataPointCollection();
                    if (base.IsTrackingViewState)
                    {
                        dataPoints.TrackViewState();
                    }
                }
                return dataPoints;
            }
        }

        [DefaultValue(typeof(Color), ""), TypeConverter(typeof(WebColorConverter))]
        public Color Color
        {
            get
            {
                object o = ViewState["Color"];
                return o == null ? Color.Empty : (Color)o;
            }
            set { ViewState["Color"] = value; }
        }

        public string Label
        {
            get
            {
                object o = ViewState["Label"];
                return o == null ? String.Empty : (string)o;
            }
            set { ViewState["Label"] = value; }
        }

        #endregion
    }
}